﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Class_member
{
    class Book
    {
        public static int Id { get; set; }
        public static  string Name { get; set; }
        public static  double Price { get; set; }
        //添加一个向属性赋值的方法
        public static  void SetBook(int id,string name,double price)
        {
            Id = id;
            Name = name;
            Price = price;
        }
        public static void PrintMsg()
        {
            Console.WriteLine("图书编号："+Id);
            Console.WriteLine("图书名称："+Name );
            Console.WriteLine("图书价格："+Price );
        }
    }
}
